Skip to content

Fix running tests in Windows#79

Merged
2 commits merged intomainfrom
jchadwick/windows-fixes
Jun 20, 2024
Merged

Fix running tests in Windows#79
2 commits merged intomainfrom
jchadwick/windows-fixes

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 17, 2024

This should resolve the toolchain registration issue from #78.

Also, it adds a batch script version of the shell script shim used to invoke protoc for tests; however, this requires --enable_runfiles to be explicitly passed or added to .bazelrc for a project, as Bazel on Windows does not populate runfiles by default.

In the future, we will need a better approach to supporting Windows that uses the runfiles manifest instead. This is tricky though, and will require some careful thought.

Comment thread buf/internal/toolchain.bzl Outdated
def declare_buf_toolchains(os, cpu, rules_buf_repo_name):
for cmd in ["buf", "protoc-gen-buf-lint", "protoc-gen-buf-breaking"]:
ext = ""
exe_suffix = ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ultra nit: cmd_suffix would be clearer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ghost ghost merged commit 850c799 into main Jun 20, 2024
@ghost ghost deleted the jchadwick/windows-fixes branch June 20, 2024 14:59
@srikrsna-buf srikrsna-buf mentioned this pull request Dec 10, 2024
@srikrsna-buf srikrsna-buf mentioned this pull request May 7, 2025
srikrsna-buf added a commit that referenced this pull request May 7, 2025
## What's Changed
* Use canonical_id in rctx.download and use the latest github release
version by @Strum355 in #62
* Fix running tests in Windows by @jchadwick-buf in
#79
* Update bzlmod example to be able to use toolchain by @sfroment in
#81
* Fix extensions.bzl to allow for multiple versions by @filippobrizzi in
#88
* Add repository_url to reproducible attributes by @styurin in
#94
* Sort targets in the buf_breaking rules by @dspencer12 in
#100
* Add `buf_format` rule by @srikrsna-buf in
#105

## New Contributors
* @Strum355 made their first contribution in
#62
* @jchadwick-buf made their first contribution in
#79
* @sfroment made their first contribution in
#81
* @filippobrizzi made their first contribution in
#88
* @dspencer12 made their first contribution in
#101
* @styurin made their first contribution in
#94

**Full Changelog**:
v0.3.0...v0.4.0
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants